home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1999 March
/
EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso
/
earcd
/
emul
/
cp4
/
support
/
playsid3.0
/
arexx
/
jukebox.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1999-01-01
|
859b
|
38 lines
/* PlaySID jukebox example */
if(~show('l', 'rexxsupport.library'))then do
if(~addlib( 'rexxsupport.library', 0, -30, 0))then do
say "Could not open ARexx support library."
exit 10
end
end
data = 'sid:jukebox.data'
path = 'sid:music/'
file = 'file'
if open(file, data, 'r') then do
address command "run SID:PlaySID"
line = readln(file)
do while ~eof(file)
name = word(line, 1)
tune = word(line, 2)
time = word(line, 3)
if SID_Load(path || name) then do
numtunes = SID_NumTunes()
say "Found" numtunes "tunes in" name
say "Playing tune" tune "for" time "seconds"
SID_SetTune(tune)
SID_Play()
Delay(time * 50)
SID_Stop()
end
line = readln(file)
end
SID_Quit()
call close(file)
end
else
say "Unable to open file" data"."